package dancrawler.server;

import dancrawler.client.GameListener;
import java.util.List;

/**
 * Represents the game world. All interactions between client and game engine
 * goes through this interface.
 */
public interface Gameworld {
    public static final int WEST = 4, EAST = 6, NORTH = 8, SOUTH = 2;
    public static final int[][] moves = {{0, 0},{-1,1},{0, 1},{1,1},{-1,0},{0,0},
        {1,0},{-1,-1},{0, -1},{1,-1}};
    
    public Tile getTile(int x, int y);
    public int getFocusX();
    public int getFocusY();
    public void addGameListener(GameListener gli);
    /**
     * Moves an object in the gameworld one step in a given direction if doing so
     * does not effect a collision
     * @param obj the object being moved
     * @param direction the direction in which the object is moved see {@link Gameworld#moves}
     * @return true if the move happens
     */
    public boolean move(GameObject obj, int direction);
    public List<Move> getTileUpdates();
    public void setUpdateList(List<Move> move);
    public void clearUpdates();
    public int getMapHeight();
    public int getMapWidth();
    public GameObjectRegister getObjectRegister();
    public void removeObject(GameObject obj);
    public Tile getStartTile();
    public void incPlayers();
    public void decPlayers();
    public Gameworld getNextLevel();
    public void setNext(Gameworld n);
    public int getDepth();
           
    
}
